home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume91 / utilitys / cpublit1 / part01 next >
Encoding:
Internet Message Format  |  1991-05-08  |  66.6 KB

  1. Path: news.larc.nasa.gov!amiga-request
  2. From: amiga-request@ab20.larc.nasa.gov (Amiga Sources/Binaries Moderator)
  3. Subject: v91i095: CpuBlit 1.0 - speeds up blitter on a 68020/30 Amiga, Part01/02
  4. Reply-To: ecarroll%maths.tcd.ie@pucc.PRINCETON.EDU
  5. Newsgroups: comp.sources.amiga
  6. Message-ID: <comp.sources.amiga:v91i095@ab20.larc.nasa.gov>
  7. Date: 07 May 91 23:45:27 GMT
  8. Approved: tadguy@uunet.UU.NET (Tad Guy)
  9. X-Mail-Submissions-To: amiga@uunet.uu.net
  10. X-Post-Discussions-To: comp.sys.amiga.misc
  11.  
  12. Submitted-by: ecarroll%maths.tcd.ie@pucc.PRINCETON.EDU
  13. Posting-number: Volume 91, Issue 095
  14. Archive-name: utilities/cpublit-1.0/part01
  15.  
  16. [ includes uuencoded executable and icons  ...tad ]
  17.  
  18. CpuBlit replaces the system BltBitMap routine with a version that uses your
  19. 68020/68030 when it is worthwhile to do so. This results in text scrolling
  20. twice as fast as usual, and in addition, the "colour flicker" effect normally
  21. present when scrolling multi-coloured text is removed.
  22.  
  23. One advantage of the blitter is that while it is busy manipulating bitmaps,
  24. the CPU can be getting on with some other work. To facilitate this, you can
  25. tell CpuBlit to only use the CPU for blitting when it would otherwise be idle
  26. (i.e. no tasks are ready to run). This way, you get increased speed without
  27. affecting your Amiga's overall computing performance.
  28.  
  29. If your Amiga only has a 68000, CpuBlit probably won't be of much use other
  30. than as a curiosity since the 68000 is slower than the blitter.
  31.  
  32. This is V1.0, which fixes all known bugs in earlier versions available from
  33. ab20.larc.nasa.gov and bix.
  34.  
  35. #!/bin/sh
  36. # This is a shell archive.  Remove anything before this line, then unpack
  37. # it by saving it into a file and typing "sh file".  To overwrite existing
  38. # files, type "sh file -c".  You can also feed this as standard input via
  39. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  40. # will see the following message at the end:
  41. #        "End of archive 1 (of 2)."
  42. # Contents:  CpuBlit.doc CpuBlit.uu CpuBlit0.uu History Kill_CpuBli.uu
  43. #   src src/cpublit.c src/makefile src/res.s src/scroll.h src/small.a
  44. #   src/system.h
  45. # Wrapped by tadguy@ab20 on Tue May  7 19:45:25 1991
  46. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  47. if test -f 'CpuBlit.doc' -a "${1}" != "-c" ; then 
  48.   echo shar: Will not clobber existing file \"'CpuBlit.doc'\"
  49. else
  50. echo shar: Extracting \"'CpuBlit.doc'\" \(14030 characters\)
  51. sed "s/^X//" >'CpuBlit.doc' <<'END_OF_FILE'
  52. X
  53. X              CpuBlit V1.00 -- Uses CPU to perform blitter functions
  54. X
  55. X           (c) Copyright Eddy Carroll, April 1991. Freely Distributable.
  56. X
  57. X
  58. XGETTING STARTED
  59. X
  60. X    In brief, CpuBlit makes your 68020/68030-equipped Amiga scroll text
  61. X    about twice as fast as before. You can quickly try it out as follows.
  62. X    Run CpuBlit (make sure you have the cache enabled). Now try Typing a
  63. X    file in a CLI window. Look at the speed. Change the text colour to
  64. X    colour 3. Type the file again. Look at the lack of flicker on the text
  65. X    as it scrolls. Nice, eh?
  66. X    
  67. X    If you have Workbench 2.0, you can install CpuBlit permanently by
  68. X    simply dragging its icon into your WBStartup drawer. Otherwise, you
  69. X    need to call CpuBlit from your Startup-Sequence. I recommend using the
  70. X    -2 or -s options for general use, though you may like to experiment
  71. X    with the others.
  72. X
  73. X    Now read on for a more detailed description.
  74. X
  75. X
  76. XINTRODUCTION
  77. X
  78. X    After upgrading from an A1000 to an A3000 a while ago, I was in Amiga
  79. X    heaven. The display was great, the disk performance much improved, and
  80. X    the speed awesome (at least compared to the A1000). But there was one
  81. X    blemish on this otherwise perfect scene: the speed of text scrolling
  82. X    in CLI windows. On a 704 x 560 screen, a snail wouldn't have much trouble
  83. X    keeping up with a full size CLI window.
  84. X
  85. X    Thus was born CpuBlit. It replaces the standard system BltBitMap routine
  86. X    with a version that uses the 68030 where practical. The 68030 can
  87. X    comfortably outrun the blitter for simple tasks like scrolling, although
  88. X    the blitter still wins out if the data has to be bit shifted as well
  89. X    (for example when scrolling sideways). Another benefit of using the CPU
  90. X    is that it isn't constrained to operating on one bitplane at a time; it
  91. X    can do them all simultaneously. So, the infamous "flicker" effect when
  92. X    coloured text is scrolling disappears. This is particularly useful when
  93. X    you're logged onto a bulletin board with colour ANSI menus.
  94. X
  95. X    At this stage, I imagine some of you are getting ready to jump up and
  96. X    complain about system throughput suffering, and how overall, the blitter
  97. X    plus the CPU is faster than the CPU on its own. I certainly wouldn't
  98. X    argue with that. So, CpuBlit can be setup to only use the CPU if no
  99. X    other tasks are ready to use it. That way, you get improved performance
  100. X    when you are single tasking, yet multiple tasks operate at full
  101. X    efficiency.
  102. X
  103. X    There is one caveat. CpuBlit will probably only be of use to you if you
  104. X    have at least a 68020 installed in your Amiga; using the standard 68000
  105. X    doesn't give any noticeable speed increase. In fact, even a standard
  106. X    68020 Amiga may not give much speed increase since it only has a 16 bit
  107. X    datapath into chip RAM. The A3000 on the other hand can access chip ram
  108. X    32 bits at a time and CpuBlit takes advantage of this. The easiest way to
  109. X    find out is to give it a try and see if you notice any other difference.
  110. X    A3000 owners will certainly notice a difference -- an A3000-25 performs
  111. X    blits about 2.8 times faster than the blitter, which results in text
  112. X    scrolling at about twice the normal speed (actually displaying the text
  113. X    to be scrolled takes a constant amount of time, regardless of what method
  114. X    you use to scroll it).
  115. X
  116. X    To get the best speed increase, use a non-overscanned screen of not
  117. X    more than four colours, and ensure you have the CPU cache enabled (it
  118. X    is disabled by default under Workbench 1.3 -- use SetCPU by Dave Haynie
  119. X    to enable it). Both overscan and 8 or 16 colour screens will decrease
  120. X    CpuBlit's efficiency, since the custom chips access CHIP ram more
  121. X    frequently, leaving less time available for the CPU. Even with these
  122. X    restrictions, you should still find CpuBlit about 50% faster than the
  123. X    blitter on the A3000.
  124. X
  125. X
  126. XUSAGE
  127. X
  128. X    You can start CpuBlit from either the CLI or the Workbench. There are
  129. X    a number of parameters you can change, to alter CpuBlit's operation.
  130. X    When you start CpuBlit, it automatically detaches itself from the CLI
  131. X    window. Any combination of the following options can be given on the
  132. X    command line or as Workbench ToolTypes. Note that each options has
  133. X    two ways of specifying it. You can use whichever way you like best.
  134. X
  135. X    BLITMODE=ALWAYS
  136. X    -a
  137. X        This is the default setting, so you normally don't need to give it
  138. X        specifically. In this mode, CpuBlit always use the CPU where
  139. X    possible. If you tend to only do one thing on your Amiga at a time,
  140. X    this is probably the best option to use.
  141. X
  142. X    BLITMODE=ONE
  143. X    -1
  144. X        In this mode, CpuBlit will only use the CPU for blits if there are
  145. X        no other tasks ready to run at that time. The blitter is used at all
  146. X    other times. Hence, you get fast blits whenever the CPU would be
  147. X    otherwise idle, and normal processing speed when running multiple
  148. X    tasks.
  149. X
  150. X    There is one catch. When displaying text via the console device,
  151. X    the program displaying the text is considered to be still running,
  152. X    even though it's the console device that actually outputs the text.
  153. X    For those interested, this is because the console device runs at
  154. X    a higher priority than user applications and so preempts the task
  155. X    before it has a chance to go to sleep. Hence, CpuBlit will think the
  156. X    program is waiting to do work, and won't use the CPU for blitting.
  157. X
  158. X    This means that the -1 option will only speed up scrolling when a
  159. X    task scrolls the text directly, rather than indirectly via the
  160. X    console device. Comms packages and text editors are the most likely
  161. X    candidates for this. Standard CLI windows won't show any improvement.
  162. X
  163. X    BLITMODE=2
  164. X    -2
  165. X        In this mode, CpuBlit will only use the CPU for blits if there is
  166. X        at most one other task waiting to run. This results in everything
  167. X    being speeded up (both applications and CLI output) but isn't quite
  168. X    as system friendly as using -1. It should be more than adequate for
  169. X    most people however.
  170. X
  171. X    BROKEN=[YES|NO]
  172. X    -b
  173. X        Some programs don't initialise bitmap structures properly. By
  174. X        default, CpuBlit passes such bitmaps on to the blitter and doesn't
  175. X    attempt to handle them. Using this option tells CpuBlit to bypass the
  176. X    validation checks it normally performs on bitmaps, and so may allow
  177. X    broken programs like this to gain the benefits of faster blitting;
  178. X    it may also cause problems. If you have a program that you think
  179. X    should be sped up by CpuBlit and it seems to be showing no noticeable
  180. X    change, then give this option a try; else, leave it alone.
  181. X
  182. X    SINGLE=[YES|NO]
  183. X    -o
  184. X        This option tells CpuBlit to only handle blits where the source and
  185. X        destination bitmaps are the same. Typically, this only happens when
  186. X    a text window is scrolling. Normally you should not need to use this
  187. X    option as CpuBlit should co-exist happily with every program that
  188. X    uses the blitter. However, if CpuBlit seems to be incompatible with
  189. X    some particular application, specifying `-o' will allow you to
  190. X    continue using it. Don't forget to notify me about the problem, so
  191. X    that it can be fixed! 
  192. X
  193. X    MINTASKPRI=N
  194. X    -pN
  195. X        If you like to keep a program running in the background (like a
  196. X    Mandelbrot generator) then you may find it counteracts the -1 and -2
  197. X    options (since it is always ready to run). You can tell CpuBlit
  198. X    to ignore all such tasks using this option; any task with a priority
  199. X    less than N will not be considered ready to run.
  200. X    
  201. X    Normally, CpuBlit will ignore any tasks with a priority less than
  202. X    zero, which is perfectly adequate for most cases. You can override
  203. X    this with a different setting if you like. For example, setting
  204. X    MINTASKPRI=-5 will cause your Mandelbrot program at priority -1 to
  205. X    be considered, but not your CPU monitor at priority -20.
  206. X
  207. X    BLITMODE=SHARE
  208. X    -s
  209. X        In this mode, CpuBlit attempts to share blits between the CPU and the
  210. X    blitter. The CPU will be used for blits by default, but if a task
  211. X    tries to blit some data while another task is already using the CPU
  212. X    to blit data, the blitter is used for the former. The result is
  213. X    better overall throughput.
  214. X    
  215. X    If you try experimenting with two CLI windows to see this effect in
  216. X    action, you won't notice anything; this is because the console.device
  217. X    used for scrolling CLI windows is single threaded and waits for a
  218. X    blit in one window to finish before starting another. Hence, both
  219. X    windows are scrolled using the CPU. It works fine in the case of
  220. X    a CLI window and a program that bypasses the console device (such as
  221. X    a comms package).
  222. X
  223. X    HELP
  224. X    -h
  225. X        Prints out a brief help message, listing the valid options. In fact,
  226. X        giving any invalid option will cause this message to be printed.
  227. X
  228. X    QUIT
  229. X    -q
  230. X        This option asks any copy of CpuBlit already installed to remove
  231. X        itself. If another program has patched BltBitMap since CpuBlit was
  232. X    started, you'll get a message asking you to terminate that program
  233. X    and then try again.
  234. X
  235. X    If you run CpuBlit with no options, it behaves as if you had typed:
  236. X
  237. X        CPUBLIT  BLITMODE=ALWAYS  SINGLE=NO  BROKEN=NO  MINTASKPRI=0
  238. X
  239. X    You can pick a different mode of operation at any time by simply running
  240. X    CpuBlit again with new options; it's not necessary to remove the previous
  241. X    copy first. You can use -a to cancel the effect of the -b and -o options.
  242. X    Note that only one of -a, -1, -2 and -s can be in effect at a time. Also,
  243. X    the BROKEN and SINGLE options default to YES if you use them without
  244. X    specifying a YES/NO value.
  245. X
  246. X
  247. XWORKBENCH
  248. X
  249. X    As mentioned above, CpuBlit can be started from Workbench. It doesn't
  250. X    return to Workbench until it quits, so if you are starting it from your
  251. X    WBStartup drawer (under 2.0) one of the tooltypes must be DONOTWAIT.
  252. X    in the icon.
  253. X
  254. X    When CpuBlit starts up, it parses all the ToolTypes in its own icon,
  255. X    followed by the tooltypes in any project icons you specified. This
  256. X    can be handy if you have several configurations of CpuBlit that you
  257. X    like to switch between. Simply create a project icon for each one,
  258. X    and set the appropriate tooltypes. Then set the default tool for each
  259. X    icon to CpuBlit. Now, clicking on any of the icons will set the
  260. X    corresponding CpuBlit options.
  261. X
  262. X    To remove CpuBlit from Workbench, you need to start it from an icon
  263. X    which has a QUIT tooltype. The standard CpuBlit distribution includes
  264. X    such an icon that you can use. If CpuBlit cannot remove itself (perhaps
  265. X    because someone else has patched into the BltBitMap routine ahead of
  266. X    CpuBlit) then the screen will flash. You can type CpuBlit QUIT in
  267. X    a CLI window for a more detailed explanation.
  268. X
  269. X
  270. XIMPLEMENTATION
  271. X
  272. X    This section gives a brief description of how CpuBlit works. It's not
  273. X    necessary to read this to use CpuBlit, it's included merely for those
  274. X    interested.
  275. X
  276. X    CpuBlit only handles blits with a very specific set of characteristics.
  277. X    First of all, the source and destination bitmaps must be aligned on the
  278. X    same bit boundary within a longword. For example, a blit from 0,0 to
  279. X    128,100 would be okay whereas a blit from 0,0 to 100,100 would fail.
  280. X    In addition, only blitter functions of the form $Cx are supported
  281. X    (i.e. plain replace operation). Also, the source and destination rows
  282. X    must be different; if they are the same, a sideways blit is being
  283. X    performed, and this is not supported.
  284. X
  285. X    Assuming the blit fulfills all these criteria, CpuBlit then checks
  286. X    system activity to see whether or not it is appropriate to use the
  287. X    CPU at all. Exactly what is checked depends on the option selected
  288. X    when CpuBlit was installed.
  289. X
  290. X    Assuming everything is still okay, CpuBlit then works out how many
  291. X    bitplanes there are in the bitmap, and calls one of four routines to
  292. X    handle the actual scrolling. It also handles any bitplane pointers of
  293. X    $FFFFFFFF or $00000000 at this time (new for Workbench 2.0, these
  294. X    values are legal for bitplane pointers, and act as if they pointed to
  295. X    either a solid or empty bitplane). If there are more than four
  296. X    bitplanes, the blit is split into two operations; the first four planes
  297. X    are moved, followed by the remaining planes. While this results in a
  298. X    bit of colour flicker for deep bitmaps, it is still not as bad as when
  299. X    the bitplanes are moved separately.
  300. X
  301. X    The actual bitmap copying is done using optimised 68000 code. The bulk
  302. X    of the data on each row is copied using a MOVE.L/DBF loop, and the uneven
  303. X    bits at the sides are copied separately. No non-68000 instructions are
  304. X    used (there wouldn't be any advantage to it anyway) so CpuBlit will still
  305. X    run on a 68000 Amiga (not that there's much point). Due to a lack of
  306. X    CPU registers (only 16 ... how DO people manage on Intel chips with a
  307. X    mere 8 registers? :-) the routines for copying three and four bitplanes
  308. X    aren't quite as efficient as those for copying one and two bitplanes.
  309. X    However, they are still quite a bit faster than the blitter itself, and
  310. X    the removal of colour flicker is more than worth the small loss in speed.
  311. X
  312. X
  313. XACKNOWLEDGEMENTS
  314. X
  315. X    Thanks to Andy Mowatt for encouraging me to change CpuBlit from an idea
  316. X    into a program. Thanks also to the following people who provided useful
  317. X    feedback and bug reports for beta versions of CpuBlit: Steve Tibbett,
  318. X    David Joiner, Mike Sinz, Dan Ten Ton, Robert Jenks, LeRoy Hutzenbiler,
  319. X    Jim Biggs, Mike Meyer, Urban Mueller, Jamie Clark, Marc Jacobs and
  320. X    Albert-Jan Brouwer. Their help is greatly appreciated.
  321. X
  322. X
  323. XAUTHOR
  324. X
  325. X    Eddy Carroll
  326. X
  327. X    Email:     ecarroll@maths.tcd.ie
  328. X    Phone:     +353-1-287-4540
  329. X    Snailmail: The Old Rectory, Delgany, Co. Wicklow, Ireland.
  330. X
  331. X
  332. XDISTRIBUTION
  333. X
  334. X    CpuBlit may be freely distributed, as long as no charge is made other
  335. X    than to cover time and copying costs. If you want to include CpuBlit
  336. X    as part of a commercial package, contact the author listed above. Fred
  337. X    Fish is specifically given permission to include CpuBlit in his fine
  338. X    disk library.
  339. END_OF_FILE
  340. if test 14030 -ne `wc -c <'CpuBlit.doc'`; then
  341.     echo shar: \"'CpuBlit.doc'\" unpacked with wrong size!
  342. fi
  343. # end of 'CpuBlit.doc'
  344. fi
  345. if test -f 'CpuBlit.uu' -a "${1}" != "-c" ; then 
  346.   echo shar: Will not clobber existing file \"'CpuBlit.uu'\"
  347. else
  348. echo shar: Extracting \"'CpuBlit.uu'\" \(10162 characters\)
  349. sed "s/^X//" >'CpuBlit.uu' <<'END_OF_FILE'
  350. Xbegin 666 CpuBlit
  351. XM```#\P`````````"``````````$```7&```!)@```^D```7&2.=^_DOO`#0D?
  352. XM2"0`2?D`````+'@`!"E.`!`I3P`8(`V0K0`$!H````"`*4``!$/L`"AP`$ZN1
  353. XM_=@I0``<9P`!%"9N`11*JP"L9AY!ZP!<3J[^@$'K`%Q.KOZ,*4``)"\`<``O/
  354. XM`&```,X@:P"LT<C1R")H`!#3R=/)(`)R`!(9*4D`(-"!4H!"9U*``D#__I_`V
  355. XM58!"=P@`(`)3@-2!'[(``"``4X)1R/_V(`)"-R``4X(?L2``(`!1RO_X0_<`@
  356. XM`21/G_P```&0)D\NBD7O``1T`6$T91)G^D'I__]A'&$H9OQ"*?__8.H@26$."
  357. XM81ID_$(I__]A$F;\9]@DR%)"#$(`9&,B<&Y@5!`99R8,```B9Q8,```@9PH,K
  358. XM```)9P0,```*`CP`'DYU`#P``0(\`/M.=2\++P)'^0``!%AR`"`\````$&`"I
  359. XM)L%1R/_\3KH')G``8`AP9&`$("\`!"\`+'@`!")L`!Q.KOYB2JP`)&<0+&P`9
  360. XM$$ZN_WPB;``D3J[^AB`?+FP`&$S??WY.=0``+P<N+P`(("P$B&<(+P!.NA1\^
  361. XM6$\O!TZZ_[)83RX?3G4M80``+3$``"TR```M<P``+6(``"UO```M<0``+7``>
  362. XM`$),251-3T1%``!!3%=!65,``$].10!45T\`4TA!4D4`0E)/2T5.``!.3P``.
  363. XM4TE.1TQ%``!-24Y405-+4%))``!154E4``!#<'5";&ET(%8Q+C`P`&=R87!H!
  364. XM:6-S+FQI8G)A<GD``$-P=4)L:70Z(&-O=6QD;B=T(&-R96%T92!L;V-A;"!M;
  365. XM97-S86=E('!O<G0N"@!I8V]N+FQI8G)A<GD``&EN='5I=&EO;BYL:6)R87)YG
  366. XM`$-P=4)L:70@<F5M;W9E9"!S=6-C97-S9G5L;'DN"@``0V]U;&1N)W0@<F5MF
  367. XM;W9E($-P=4)L:70[('-O;65O;F4@96QS92!H87,@<&%T8VAE9"!";'1":71-Z
  368. XM87`N(%!L96%S92!R96UO=F4*86YY(&]T:&5R('5T:6QI=&EE<R!Y;W4@:&%V3
  369. XM92!I;G-T86QL960@86YD('1H96X@=')Y(&%G86EN+@H``$-P=4)L:70@:&%S-
  370. XM;B=T(&)E96X@:6YS=&%L;&5D('EE="X*`$-O=6QD;B=T('-P87=N(&)A8VMGN
  371. XM<F]U;F0@0W!U0FQI="!T87-K+@H``$-P=4)L:70@5C$N,#`@J2`Q.3DQ($5DT
  372. XM9'D@0V%R<F]L;"X*`"\+)F\`""`3Y8!![`,B*7`(``-$*6L`!`-(*6L`"`-,[
  373. XM&6L`#`-0)E].=4Y5__A(YP`P)FT`"$AX``)(>OW6+PM.NA%<3^\`#$J`9A)P!
  374. XM`"E``S(I0`,V*4`#.F```L!(>``"2'K]LB\+3KH1-$_O``Q*@&8*<`$I0`,R5
  375. XM8``"H$AX``)(>OV6+PM.NA$43^\`#$J`9@IP`BE``S)@``*`2'@``DAZ_7HO@
  376. XM"TZZ$/1/[P`,2H!F"G`#*4`#,F```F!(>``"2'K]7B\+3KH0U$_O``Q*@&8*W
  377. XM<`$I0`,Z8``"0$AX``)(>OU"+PM.NA"T3^\`#$J`9@IP`2E``S9@``(@2'@`;
  378. XM`DAZ_28O"TZZ$)1/[P`,2H!F"G`!*4`$C&```@!(>``"2'K]"B\+3KH0=$_OL
  379. XM``Q*@&8:2BL``F<40>L``B\(3KH2#%A/&4`#/F```=!(>``(2'K\WB\+3KH0[
  380. XM1$_O``Q*@&8``)Q%ZP`(($I2BDH09P``B$H29P``@DAX``9(>OR\+PI.NA`8/
  381. XM3^\`#$J`9@A"K`,R8``!ADAX``-(>ORF+PI.N@_Z3^\`#$J`9@IP`2E``S)@P
  382. XM``%F2'@``TAZ_(HO"DZZ#]I/[P`,2H!F"G`"*4`#,F```49(>``%2'K\;B\*!
  383. XM3KH/ND_O``Q*@&8``2YP`RE``S)@``$D<`!@``$@2'@`!DAZ_$PO"TZZ#Y)/#
  384. XM[P`,2H!F1D'K``8O2``(*TC__%*(2.T!`/_\(&\`"$H09R!(>``"2'K\(B\M1
  385. XM__Q.N@]>3^\`#$J`9@A"K`,Z8```S'`!*4`#.F```,)(>``&2'K[_"\+3KH/2
  386. XM-D_O``Q*@&9"0>L`!B](``@K2/_\4HA([0$`__P@;P`(2A!G'DAX``)(>OO&7
  387. XM+RW__$ZZ#P)/[P`,2H!F!D*L`S9@<'`!*4`#-F!H2'@`"DAZ^ZPO"TZZ#MY/R
  388. XM[P`,2H!F,$'K``HO2``(*TC__%*(*TC__")O``A*$6<22A!G#B\(3KH08EA/:
  389. XM&4`#/F`F<`!@)$AX``1(>OMR+PM.N@Z83^\`#$J`9@AP`2E`!(Q@!'``8`)P!
  390. XM`4S?#`!.74YU2.<`,B9O`!`@;``0,"@`%'(DL$%E#")++'@`!$ZN_GI@."QXQ
  391. XM``1.KO]\(&P`$"1H`8@@"F<:("H`"F<0($`B2Q`8L!EF!DH`9O9G!"128.(L!
  392. XM>``$3J[_=B`*3-],`$YU3E7_\$CG`3)^`47Z!(Q"ITAZ^N!.N@\B4$\F0"`+!
  393. XM9P`!*D/Z^MQP`"QX``1.KOW8*4`$6$J`9P`!$B)`,'S_XDWZ!%P@#BQX``1.1
  394. XMKOY<)(`@2RQX``1.KOZ`($LL>``$3J[^C"E`!(1*@&<``*@@0"`H`!A*@&<,9
  395. XM4X!G'E.`9SI@``""<`U![`,R+&P$A")N`!02V%'(__Q@:G`-(FP$A"!I`!1#,
  396. XM[`,R$MA1R/_\2&P#,F$`^\983V!*+'@`!$ZN_WPB;`18,'S_XB`23J[^7"M`$
  397. XM__!!^@/(L<!F#GX`<@$@;`2$(4$`'&`6(FP$6#!\_^).KOY<<`(@;`2$(4``'
  398. XM'$ZN_W8B;`2$+'@`!$ZN_H9@`/](2H=F`/\X+PM.N@W:6$]!^@-H*4@#1'#_]
  399. XML*P#0&<,<@HL;``<3J[_.F#L(FP$6"QX``1.KOYB3-],@$Y=3G5.5?_@2.<W^
  400. XM,BXM``@F;0`,2H=7P$0`2(!(P"E`!)!(>OF`80#^*EA/)$`@"F=T<`$I0`24S
  401. XM0J="ITZZ#:Q03RE`!(AF+DJL!)!F'BQL`!Q.KO_$<BTO00`D(@!!^OED)`@F[
  402. XM+P`D3J[_T$AX``IA`/BL6$\I;`2(!')"K`1\0>P#,BE(!'@@2D/L!&0L>``$1
  403. XM3J[^DB!L!(A.KOZ`(&P$B$ZN_HQ*K`209P``LB!L`"0K:``D__1#^ODX<``L#
  404. XM>``$3J[]V"E`!&!F"DAX``5A`/A,6$]\`"!L`"2\J``<;&X@;?_T(!!G7B!H>
  405. XM``1*$&=6(@`L;``<3J[_@BH`(&W_]"!H``0L;`1@3J[_LBM`__!G'B!`*V@`?
  406. XM-O_L(&W_["`09PXO`&$`^BY83UBM_^Q@ZB!M__`L;`1@3J[_IB(%+&P`'$ZN'
  407. XM_X)2AE"M__1@B")L!&`L>``$3J[^8F!*?`&\AVQ$(`;E@"\S"`!A`/GH6$]*I
  408. XM@&8N+&P`'$ZN_\1![``T(DA*&6;\4XF3R"(`)@E![``T)`A.KO_02'@`!6$`=
  409. XM]WY83U*&8+A*K`249P``SDJL!(QG"'`"*4`$?&`&<`$I0`1\($I#[`1D+'@`$
  410. XM!$ZN_I(@;`2(3J[^@"!L!(A.KOZ,2JP$D&<L<`*PK`2`9B1#^O@.<`!.KOW8]
  411. XM*4`$7$J`9Q(L0)'(3J[_H").+'@`!$ZN_F)*K`209EIP`;"L!(!F("QL`!Q.#
  412. XMKO_$<AXO00`D(@!!^O?>)`@F+P`D3J[_T&`R<`*PK`2`9BHL;``<3J[_Q')#3
  413. XMTH$O00`D(@!!^O?4)`@F+P`D3J[_T$AX``5A`/:N6$]"IV$`]J983TJL!(QGJ
  414. XM+DJL!)!F'BQL`!Q.KO_$<B,O00`D(@!!^O@@)`@F+P`D3J[_T$AX``5A`/9R+
  415. XM6$](;`,R80#X=EA/2JP$D&<&80#[\&!B2'@/H$AZ^^9(>``%2'KVT$ZZ"5)/<
  416. XM[P`02H!F*"QL`!Q.KO_$<B@O00`D(@!!^O?J)`@F+P`D3J[_T$AX``IA`/88?
  417. XM6$\L;``<3J[_Q'(C+T$`)"(`0?KW["0()B\`)$ZN_]!"IV$`]?),[4SL_\!.B
  418. XM74YU```P'\V(S8A3N0```T`L'T[Y```+O$YU2D1G^K/(9@:V06?L8`A*N0``/
  419. XM`TAFXB\&`@8`\`P&`,!FU"P`M88"!@`?9LI*N0```TQF&$HH``1FO$IH``9F0
  420. XMMDHI``1FL$II``9FJE*Y```#0,V(('D```-$3M#-B"PY```#0&:*8%8@>0``I
  421. XM`!!!Z`&6L>@`"&=$/P`@4"!0$"@`"2!0S8A*AF<*L#D```-0;`#_6#`?8"8@V
  422. XM>0```!!!Z`&6L>@`"&<4(%`P:``(S8B\.0```U!L`/\X8`+-B$CG??Y.KO\<M
  423. XM2,!(P4C"2,-(Q$C%MD%B```P/"@``$C&)$;#QBP`YHX"!@#\TH8H03PI``!(_
  424. XMQB9&Q\8L`N:.`@8`_-:&*D-@.-*%4X$\*```2,;#QD2&)$8L`.:.`@8`_-*&<
  425. XM*$'6A5.#/"D``$C&Q\9$AB9&+`+FC@(&`/S6ABI#`D``']B`(@0"00`?ZHS2(
  426. XM@=*!9@)3A$WZ!P(D-A``T(#0@$WZ!G8B-@``?``<*``%O"D`!64$'"D`!5.&#
  427. XM(`12@-"`T("5P)?`Q4S'35.$)@0@!4'H``A#Z0`(*`@J"2XO`!1/[__`+$\_]
  428. XM!WX`XM=D+E)'($0B12@0*A%&A6<``*!&A6<``)I&A&<``)Q&A&<``*3)B,N),
  429. XMT<K3RRS(+,E8A%B%4<[_R%2/G<\L#N*.649J"$_O`$!@``"*#$8`#&(8)@-J>
  430. XM!L*"4$901BQ[:#).ED_O`$!@``!L)@-J",*"80`$MF`(80`"G`1&`!!/[P`@^
  431. XM+'MH#$Z63^\`(&```$8```Y.```.O@``#VX``!!^```1S@``$?H``!(V```2Z
  432. XMDLF(RXE@`/]ZR8C+B=/+80`$U&``_VS)B,N)T\MA``408`#_7B`'4[D```-`#
  433. XM3-]_OBP?3G5(Y__"3>\`,"!>(EY3@"@!1H0J`D:%4X-K```P+!C,@2X1SH2.N
  434. XMAB+'+`,BV%'.__PL&,R"+A'.A8Z&(L?1S-/-4<C_VDS?0_].=2P8S($N$<Z$4
  435. XMCH8BQRP8S((N$<Z%CH8BQ]',T\U1R/_B3-]#_TYU2.?_\DWO`#A,U@\`4X`H%
  436. XM`4:$*@)&A5.#:P``5"P8S($N$<Z$CH8BQRP:S($N$\Z$CH8FQRP#(MA1SO_\@
  437. XM+`,FVE'.__PL&,R"+A'.A8Z&(L<L&LR"+A/.A8Z&)L?1S-/-U<S7S5'(_[9,O
  438. XMWT__3G4L&,R!+A'.A(Z&(L<L&,R"+A'.A8Z&(L<L&LR!+A/.A(Z&)L<L&LR"K
  439. XM+A/.A8Z&)L?1S-/-U<S7S5'(_\9,WT__3G5(Y__R3>\`.$S>#P!3@"@!1H0JN
  440. XM`D:%4X-K``"(+!C,@2X1SH2.AB+'+!K,@2X3SH2.AB;'+`,BV%'.__PL`R;:.
  441. XM4<[__"P8S((N$<Z%CH8BQRP:S((N$\Z%CH8FQ]',T\W5S-?-+PLO"B1>)E8L#
  442. XM&LR!+A/.A(Z&)L<L`R;:4<[__"P:S((N$\Z%CH8FQ]7,U\TLBRT*)%\F7U'(!
  443. XM_X),WT__3G4L&,R!+A'.A(Z&(L<L&,R"+A'.A8Z&(L<L&LR!+A/.A(Z&)L<L0
  444. XM&LR"+A/.A8Z&)L?1S-/-U<S7S2\++PHD7B96+!K,@2X3SH2.AB;'+!K,@BX3L
  445. XMSH6.AB;'U<S7S2R++0HD7R9?4<C_FDS?3_].=4CG__)-[P`X3-X/`%.`*`%&,
  446. XMA"H"1H53@VL``*PL&,R!+A'.A(Z&(L<L&LR!+A/.A(Z&)L<L`R+84<[__"P#@
  447. XM)MI1SO_\+!C,@BX1SH6.AB+'+!K,@BX3SH6.AB;'T<S3S=7,U\U(YP#P3-8/V
  448. XM`"P8S($N$<Z$CH8BQRP:S($N$\Z$CH8FQRP#(MA1SO_\+`,FVE'.__PL&,R"D
  449. XM+A'.A8Z&(L<L&LR"+A/.A8Z&)L?1S-/-U<S7S4C6#P!,WP\`4<C_7DS?3_].>
  450. XM=2P8S($N$<Z$CH8BQRP8S((N$<Z%CH8BQRP:S($N$\Z$CH8FQRP:S((N$\Z%$
  451. XMCH8FQ]',T\W5S-?-2.<`\$S6#P`L&,R!+A'.A(Z&(L<L&,R"+A'.A8Z&(L<L_
  452. XM&LR!+A/.A(Z&)L<L&LR"+A/.A8Z&)L?1S-/-U<S7S4C6#P!,WP\`4<C_?DS?.
  453. XM3_].=4CG^,)-[P`D(%XB5E.`)`%&@B88QH$H$<B"B(,BQ-',T\U1R/_N3-]#Z
  454. XM'TYU2.?X\DWO`"Q,W@\`4X`D`4:")AC&@2@1R(*(@R+$)AK&@2@3R(*(@R;$6
  455. XMT<S3S=7,U\U1R/_>3-]/'TYU2.?X\DWO`"Q,W@\`4X`D`4:")AC&@2@1R(*(>
  456. XM@R+$)AK&@2@3R(*(@R;$T<S3S=7,U\TO"2\((%XB5B88QH$H$<B"B(,BQ-',G
  457. XMT\TLB2T((%\B7U'(_[Y,WT\?3G5(Y_CR3>\`+$S>#P!3@"0!1H(F&,:!*!'(\
  458. XM@HB#(L0F&L:!*!/(@HB#)L31S-/-U<S7S4CG`/!,U@\`)AC&@2@1R(*(@R+$_
  459. XM)AK&@2@3R(*(@R;$T<S3S=7,U\U(U@\`3-\/`%'(_ZY,WT\?3G5(YY-`?O]3>
  460. XM@"8#:RQ30VL8@YDL`R+'4<[__(69T\U1R/_P3-\"R4YU@YF%F=/-4<C_^$S?[
  461. XM`LE.=2P!S(*-F=/-4<C_^DS?`LE.=4CG\T!&@4:"?@!3@"8#:RQ30VL8PYDL]
  462. XM`R+'4<[__,69T\U1R/_P3-\"STYUPYG%F=/-4<C_^$S?`L].=2P!C(+-F=/-U
  463. XM4<C_^DS?`L].=?____]_____/____Q____\/____!____P/___\!____`/__M
  464. XM_P!___\`/___`!___P`/__\`!___``/__P`!__\``/__``!__P``/_\``!__`
  465. XM```/_P``!_\```/_```!_P```/\```!_````/P```!\````/````!P````,`+
  466. XM```!_____X````#`````X````/````#X````_````/X```#_````_X```/_`\
  467. XM``#_X```__```/_X``#__```__X``/__``#__X``___``/__X`#___``___XY
  468. XM`/___`#___X`____`/___X#____`____X/____#____X_____/____X``$CG/
  469. XM.#(L>``$<@!P)$ZN_SI*@&<``&PF0)/)3J[^VB1`(&H`K-'(T<@G:``\``1"=
  470. XMJ``\)KP````D1>L`""QY````'#3\*'PDS#3\3KDD[P`D-/PL?"3.1^L`!"8+&
  471. XMY(LT_"(\),,D_$[N_V0B+P`<)"\`("@O`"A.KO]V3-],'$YU<'A.^0```58@O
  472. XM+P`$#```86T*#```>FX$!```($YU``!.5?_\2.<#,"9O`!PD;P`@+B\`)$J'L
  473. XM9S9*$V<R2A)G+G``$!LO`$ZZ_\!R`!(:+H$O0``43KK_LEA/(B\`$)*`+`%*O
  474. XMAF<$(`9@&E.'8,9*AV<02A-G!'`!8`I*$F<$</]@`G``3-\,P$Y=3G4O"R9OX
  475. XM``AP`!`30>P#50@P``,(`&<$4HM@["`+)E].=0```````'!A(&\`!")(<@!P:
  476. XM`"\"#!``*V<&#!``+68"4D@0&`0``#!M$@P```EN#"0!Y8'2@M*!TH!@Y@P1!
  477. XM`"UF`D2!)!\@"%.`(&\`"""!D(E.=4CG`!(F;P`,2JL`"F<*(DLL>``$3J[^-
  478. XMF!=\`/\`"'#_)T``%'``$"L`#RQX``1.KOZP(DMP(DZN_RY,WT@`3G5(YP,RJ
  479. XM)F\`&"XO`!QP_RQX``1.KOZV?``<`'#_O(!F!'``8&9P(B(\``$``4ZN_SHD;
  480. XM0"`*9@@@!DZN_K!@2B5+``H@!Q5```D5?``$``A"*@`.(`850``/D\E.KO[:B
  481. XM)4``$"`+9P@B2DZN_IY@&D'J`!@E2``40>H`%"5(`!Q"J@`8%7P``@`@(`I,&
  482. XMWTS`3G5.5?_\+PLF;0`((`MF!'``8!8O"TZZ_J8F0$AM__PO"TZZ_L(@+?_\B
  483. XM)FW_^$Y=3G4```/L````"@```````!4<```.%@``#A(```X.```."@``#@8`N
  484. XM``X"```-_@``#?H```NX````#@````$``!36```,6```#"@```Y"```,<```"
  485. XM#$H```P>```,%```#`P```OL```+S@``"[````$V````#@````````/R```#`
  486. XMZ@```18`````````````````````````````````````````````````````!
  487. XM9&]S+FQI8G)A<GD`0W!U0FQI="!6,2XP,""I($5D9'D@0V%R<F]L;"P@07!R>
  488. XM(#$Y.3$N(%)E<&QA8V5S(&)L:71T97(@=VET:"`V.#`R,"\V.#`S,"X*57-A4
  489. XM9V4Z($-P=4)L:70@>V]P=&EO;G-]('P@>VME>7=O<F1S?0H*3W!T:6]N<SH*M
  490. XM("`@("UA("`@($%L=V%Y<R!U<V4@0U!5('1O(&1O(&)L:71S("AD969A=6QT5
  491. XM('-E='1I;F<I"B`@("`M,2`@("!5<V4@0U!5(&9O<B!B;&ET<R!U;FQE<W,@C
  492. XM86YO=&AE<B!T87-K(&ES(')E861Y('1O(')U;@H@("`@+3(@("`@57-E($-0V
  493. XM52!F;W(@8FQI=',@=6YL97-S(&UO<F4@=&AA;B!O;F4@=&%S:R!I<R!R96%D_
  494. XM>2!T;R!R=6X*("`@("UB("`@(%5S92!#4%4@979E;B!I9B!B:71M87`@:7-N#
  495. XM)W0@:6YI=&EA;&ES960@8V]R<F5C=&QY"B`@("`M;R`@("!5<V4@0U!5(&]N9
  496. XM;'D@=VAE;B!A('-I;F=L92!B:71M87`@:7,@:6YV;VQV960*("`@("US("`@$
  497. XM(%5S92!#4%4@9F]R(&)L:71S('5N;&5S<R!A(&)L:70@:7,@86QR96%D>2!I'
  498. XM;B!P<F]G<F5S<PH@("`@+7!.("`@26=N;W)E('1A<VMS('=I=&@@<')I;W)I3
  499. XM='D@/"!.("AD969A=6QT('-E='1I;F<@:7,@,"D*("`@("UQ("`@(%)E;6]VH
  500. XM92!#<'5";&ET(&9R;VT@=&AE('-Y<W1E;0H*2V5Y=V]R9',Z($),251-3T1%(
  501. XM/5M!3%=!65-\3TY%?%173WQ32$%215T@0E)/2T5.(%-)3D=,12!-24Y405-+#
  502. XM4%))/6X@455)5`H*4V5E('1H92!D;V-U;65N=&%T:6]N(&9O<B!D971A:6QS2
  503. XM(&%B;W5T('-T87)T:6YG($-P=4)L:70@9G)O;2!7;W)K8F5N8V@N"@`````,U
  504. XM>@``#%8```PF```,&@``````````````````_____P``#'H`````````````V
  505. XM````("`@("`@("`@*"@H*"@@("`@("`@("`@("`@("`@("!($!`0$!`0$!`0`
  506. XM$!`0$!`0A(2$A(2$A(2$A!`0$!`0$!"!@8&!@8$!`0$!`0$!`0$!`0$!`0$!.
  507. XM`0$!`1`0$!`0$(*"@H*"@@("`@("`@("`@("`@("`@("`@("$!`0$"`@("`@X
  508. XM("`@("`H*"@H*"`@("`@("`@("`@("`@("`@($@0$!`0$!`0$!`0$!`0$!"$D
  509. XMA(2$A(2$A(2$$!`0$!`0$(&!@8&!@0$!`0$!`0$!`0$!`0$!`0$!`0$!$!`0>
  510. XM$!`0@H*"@H*"`@("`@("`@("`@("`@("`@("`@(0$!`0(````````^P````%X
  511. X@`````````T0```,N```#*@```R8```,B`````````_(0X
  512. X``
  513. Xend
  514. Xsize 7232
  515. END_OF_FILE
  516. if test 10162 -ne `wc -c <'CpuBlit.uu'`; then
  517.     echo shar: \"'CpuBlit.uu'\" unpacked with wrong size!
  518. fi
  519. # end of 'CpuBlit.uu'
  520. fi
  521. if test -f 'CpuBlit0.uu' -a "${1}" != "-c" ; then 
  522.   echo shar: Will not clobber existing file \"'CpuBlit0.uu'\"
  523. else
  524. echo shar: Extracting \"'CpuBlit0.uu'\" \(795 characters\)
  525. sed "s/^X//" >'CpuBlit0.uu' <<'END_OF_FILE'
  526. Xbegin 666 CpuBlit.info
  527. XMXQ```0``````&P`C`#H`%P`%``,``0?`Z6``````````````````````````<
  528. XM```!`U(`````!\#I>````!<````1`````````````!`````````Z`!8``@`"*
  529. XM:7`#````````````````0`````````#```"``````,```8``````P``!P```>
  530. XM``#```'``````,```(``````P`````````#``````````,``#```````P`$`.
  531. XM``````#``````````,``````````P`````````#``````````,``````/_X`]
  532. XMP`````'__\#`````\___\,````&____XP````?_'\?S``````````,!_____&
  533. XM____P/________^`P`&```````#!`\```````,'#X```````P?/@`!P```#`/
  534. XM^^``/@```,`_P``>````P`^``^P```#`'^`_^````,!S\?_\^```P?______]
  535. XM``#`?__]_^?``,`'__[^````P`/__`````#`#_?@`````,`_```7=```P/@`)
  536. XM`*JJ@`#````#=W=@`,```$*JJK``P````7U?0`#`````>`<``(``````````'
  537. XM````&````!1!551(3U(]161D>2!#87)R;VQL`````!!"3$E434]$13U!;'=A3
  538. XM>7,`````"E-)3D=,13U.;P`````*0E)/2T5./4YO``````I$3TY/5%=!250`Z
  539. X``
  540. Xend
  541. Xsize 540
  542. END_OF_FILE
  543. if test 795 -ne `wc -c <'CpuBlit0.uu'`; then
  544.     echo shar: \"'CpuBlit0.uu'\" unpacked with wrong size!
  545. fi
  546. # end of 'CpuBlit0.uu'
  547. fi
  548. if test -f 'History' -a "${1}" != "-c" ; then 
  549.   echo shar: Will not clobber existing file \"'History'\"
  550. else
  551. echo shar: Extracting \"'History'\" \(2257 characters\)
  552. sed "s/^X//" >'History' <<'END_OF_FILE'
  553. XHISTORY
  554. X
  555. X
  556. X    Version 1.00, 20 Apr 1991
  557. X
  558. X        First release to the public. (No changes since V0.98.)
  559. X
  560. X
  561. X    Version 0.98, 10 Apr 1991
  562. X
  563. X    Added Workbench support and ReadArgs-style command line arguments.
  564. X    Also added MinTaskPri option to allow CpuBlit to ignore background
  565. X    tasks when deciding whether it should do a blit or not. If running
  566. X    under 1.3, CpuBlit uses its own version of FindPort() instead of
  567. X    Exec's version which causes Enforcer hits on an A3000. No bugs
  568. X    reported since V0.97, so it looks like the blit code itself is
  569. X    pretty stable now (famous last words).
  570. X
  571. X
  572. X    Version 0.97, 17 Feb 1991
  573. X
  574. X    Fixed bug in handling blits which had a negative Y offset.
  575. X    Previously, the negative Y offset got changed into a large positive
  576. X    Y offset; if this was the destination offset, random memory could
  577. X    get trashed. Now works fine with Shanghai.
  578. X
  579. X
  580. X    Version 0.96, 14 Feb 1991
  581. X
  582. X    Fixed bug in handling of single plane bitmaps. Added check to ensure
  583. X    blits with zero width don't cause surprising results. Modified
  584. X    command line parsing to handle multiple arguments, since the
  585. X    various parameters are no longer all mutually exclusive. Tidied up
  586. X    source a little.
  587. X
  588. X
  589. X    Version 0.95, 9 Feb 1991
  590. X
  591. X    Now handles being run from a disk with a space in its name properly
  592. X    (for example "RAM DISK:CpuBlit"). Previously, everything after the
  593. X    space got treated as a command line option. Also added some checks
  594. X    to ensure upwards compatibility with future Amigas.
  595. X
  596. X
  597. X    Version 0.93, 7 Feb 1991
  598. X
  599. X    Bug in the handling of Workbench 2.0 $00000000 and $FFFFFFFF bitplane
  600. X    pointers is now fixed. Since Workbench 2.0 uses these for gadgetry
  601. X    etc, this was causing quite a few problems under 2.0. Also fixed a
  602. X    small nasty bug that arrived with CpuBlit 0.92.
  603. X
  604. X
  605. X    Version 0.92, 6 Feb 1991
  606. X
  607. X    Now correctly handles the case where the source and destination
  608. X    bitmaps do not have equal numbers of bitplanes. Also fixed problem
  609. X    where CpuBlit was (incorrectly) intercepting blits with minterms of
  610. X    $D0, $E0 or $F0.
  611. X
  612. X
  613. X    Version 0.91, 5 Feb 1991
  614. X
  615. X    Added `-o' option to help track down the source of CpuBlit
  616. X    incompatibilities.
  617. X
  618. X
  619. X    Version 0.90, 3 Feb 1991
  620. X
  621. X    Initial release. Currently thought to be bug free, but undoubtedly
  622. X    this will change once users get their hands on it :-)
  623. END_OF_FILE
  624. if test 2257 -ne `wc -c <'History'`; then
  625.     echo shar: \"'History'\" unpacked with wrong size!
  626. fi
  627. # end of 'History'
  628. fi
  629. if test -f 'Kill_CpuBli.uu' -a "${1}" != "-c" ; then 
  630.   echo shar: Will not clobber existing file \"'Kill_CpuBli.uu'\"
  631. else
  632. echo shar: Extracting \"'Kill_CpuBli.uu'\" \(713 characters\)
  633. sed "s/^X//" >'Kill_CpuBli.uu' <<'END_OF_FILE'
  634. Xbegin 666 Kill_CpuBlit.info
  635. XMXQ```0``````?``C`#H`%P`$``,``0?`*0@`````````````````````````D
  636. XM```!!%('P".@!\`IH````'@````1`````````````!`````````Z`!8``@`">
  637. XM:!`#````````````````0`````````#```"`_^```,```8\`'@``P``!\``!Z
  638. XMP`#```'\``!P`,```X<``!@`P``&`<``#`#```8`<``,`,``#``<``8`P`$,?
  639. XM``<`!@#```P``<`&`,``!@``<`P`P``&```<#`#```,```<8`,```<``/_X`P
  640. XMP```<`'__\#````/\___\,````'____XP````?_'\?S``````````,!_____%
  641. XM____P/________^`P`&```````#!`\```````,'#X```````P?.``!P```#`O
  642. XM^@``/@```,`\P``>````P`F``^P```#`&>`/^````,!S\>/\^```P?/_^/_YH
  643. XM``#`<__\/^'``,`!__Z.````P`'__`````#`#/?@`````,`^```6!```P/@`)
  644. XM`*HJ@`#````#87=@`,`````*JK``P````7U?0`#`````>`<``(``````````/
  645. X9````"$-P=4)L:70`````"`````5154E4`'U?G
  646. X``
  647. Xend
  648. Xsize 475
  649. END_OF_FILE
  650. if test 713 -ne `wc -c <'Kill_CpuBli.uu'`; then
  651.     echo shar: \"'Kill_CpuBli.uu'\" unpacked with wrong size!
  652. fi
  653. # end of 'Kill_CpuBli.uu'
  654. fi
  655. if test ! -d 'src' ; then
  656.     echo shar: Creating directory \"'src'\"
  657.     mkdir 'src'
  658. fi
  659. if test -f 'src/cpublit.c' -a "${1}" != "-c" ; then 
  660.   echo shar: Will not clobber existing file \"'src/cpublit.c'\"
  661. else
  662. echo shar: Extracting \"'src/cpublit.c'\" \(15098 characters\)
  663. sed "s/^X//" >'src/cpublit.c' <<'END_OF_FILE'
  664. X/****************************************************************************
  665. X *
  666. X *        CPUBLIT.C
  667. X *
  668. X *        (C) Copyright Eddy Carroll, 1991. Freely distributable.
  669. X * 
  670. X *        CpuBlit replaces the BltBitMap function in graphics.library with
  671. X *        a version that uses the CPU where practical. This is up to 2.8
  672. X *        times faster on a 68030 system.
  673. X *
  674. X *        This module installs the new blit routine, handles parsing the
  675. X *        command line options etc. Scroll.s does the actual blitting.
  676. X *
  677. X ***************************************************************************/
  678. X
  679. X#define DEBUG    0            /* If 1, then include debugging code            */
  680. X
  681. X#ifndef LATTICE_50
  682. X#include "system.h"
  683. Xtypedef void (*__fptr)();    /* The sort of thing returned by SetFunction    */
  684. X#endif
  685. X
  686. X#include "scroll.h"
  687. X
  688. X#define YES        1
  689. X#define NO        0
  690. X
  691. X#define NAME            "CpuBlit V1.00"
  692. X#define PORTNAME        NAME
  693. X#define SIGNON            NAME " \251 1991 Eddy Carroll.\n"
  694. X#define DATE            "Apr 1991"
  695. X
  696. X#define print(s)        Write(Output(), s, strlen(s))
  697. X#define BltBitMap_LVO    (-30)    /* Offset of BltBitMap in graphics.library    */
  698. X
  699. Xchar HelpMsg[] =
  700. XNAME " \251 Eddy Carroll, " DATE ". Replaces blitter with 68020/68030.\n"
  701. X"Usage: CpuBlit {options} | {keywords}\n"
  702. X"\n"
  703. X"Options:\n"
  704. X"    -a    Always use CPU to do blits (default setting)\n"
  705. X"    -1    Use CPU for blits unless another task is ready to run\n"
  706. X"    -2    Use CPU for blits unless more than one task is ready to run\n"
  707. X"    -b    Use CPU even if bitmap isn't initialised correctly\n"
  708. X"    -o    Use CPU only when a single bitmap is involved\n"
  709. X"    -s    Use CPU for blits unless a blit is already in progress\n"
  710. X"    -pN   Ignore tasks with priority < N (default setting is 0)\n"
  711. X"    -q    Remove CpuBlit from the system\n"
  712. X"\n"
  713. X"Keywords: BLITMODE=[ALWAYS|ONE|TWO|SHARE] BROKEN SINGLE MINTASKPRI=n QUIT\n"
  714. X"\n"
  715. X"See the documentation for details about starting CpuBlit from Workbench.\n";
  716. X
  717. X/****************************************************************************
  718. X *
  719. X *        Globals
  720. X * 
  721. X ***************************************************************************/
  722. X
  723. Xstruct Gfxbase       *GfxBase;
  724. Xstruct IntuitionBase *IntuitionBase;
  725. Xstruct IconBase         *IconBase;
  726. X
  727. X/*
  728. X *        Valid modes of operation for BlitMode
  729. X */
  730. X#define BLIT_ALWAYS        0    /* Always use CPU for blits                        */
  731. X#define BLIT_ONE        1    /* Use CPU unless another task is ready to run    */
  732. X#define BLIT_TWO        2    /* Use CPU unless more than one task is ready    */
  733. X#define BLIT_SHARE        3    /* Use CPU unless CPU is already doing a blit    */
  734. X
  735. X/*
  736. X *        This array corresponds to the above modes
  737. X */
  738. Xvoid (*BlitFuncs[])() = { StartBlit, Friend1, Friend2, ShareBlit };
  739. X
  740. X/*
  741. X *        All the settings that can be set by the program
  742. X */
  743. Xstruct Settings {
  744. X    long    BlitMode;        /* Current mode of operation for blits  */
  745. X    long    OnlySingle;        /* True if restricting blits to 1 bmap    */
  746. X    long    Broken;            /* True if handling broken software        */
  747. X    BYTE    MinTaskPri;        /* All tasks less than this are ignored    */
  748. X} Settings = {
  749. X    BLIT_ALWAYS, NO, NO, 0
  750. X};
  751. X
  752. X/*
  753. X *        Commands that we can send in a message
  754. X */
  755. X#define MSG_GETVARS        0    /* Get copy of current CpuBlit settings    */
  756. X#define MSG_SETVARS        1    /* Update CpuBlit settings                */
  757. X#define MSG_QUIT        2    /* Remove background copy of CpuBlit    */
  758. X
  759. Xstruct MyMsg {
  760. X    struct    Message msg;    /* Standard message structure            */
  761. X    struct    Settings *vars;    /* Settings used by CpuBlit                */
  762. X    int        command;        /* Requested operation                    */
  763. X    int        result;            /* True if command completed okay        */
  764. X} MyMsg, *msg;
  765. X
  766. X/*
  767. X *        Return codes passed back in result
  768. X */
  769. X#define MSG_OKAY    0        /* Message was handled correctly        */
  770. X#define MSG_REMOVED    1        /* CpuBlit was removed safely            */
  771. X#define MSG_FAILED    2        /* CpuBlit couldn't be removed            */
  772. X
  773. X/*
  774. X *        Scalar variables
  775. X */
  776. Xstruct MsgPort *LocalPort;    /* Local port for returned messages        */
  777. Xlong QuitFlag;                /* True if user asks CpuBlit to quit    */
  778. Xlong FromWorkbench;            /* True if started from Workbench        */
  779. Xlong AlreadyRunning;        /* True if CpuBlit already installed    */
  780. X
  781. X/****************************************************************************
  782. X *
  783. X *        myexit(err)
  784. X *
  785. X *        Performs a small amount of cleanup and then exits to AmigaDos.
  786. X *        Principally, handles cleaning up if we were run from Workbench.
  787. X *
  788. X ***************************************************************************/
  789. X
  790. Xvoid myexit(err)
  791. X{
  792. X    if (LocalPort)
  793. X        DeletePort(LocalPort);
  794. X
  795. X    exit(err);
  796. X}
  797. X
  798. X/****************************************************************************
  799. X *
  800. X *        SetVars(settings)
  801. X *
  802. X *        Sets the various CpuBlit flags according to the values in the
  803. X *        supplied Settings structure.
  804. X *
  805. X ***************************************************************************/
  806. X
  807. Xvoid SetVars(struct Settings *settings)
  808. X{
  809. X    BlitFunc    = BlitFuncs[settings->BlitMode];
  810. X    OnlySingle    = settings->OnlySingle;
  811. X    Broken        = settings->Broken;
  812. X    MinTaskPri    = settings->MinTaskPri;
  813. X}
  814. X
  815. X/****************************************************************************
  816. X *
  817. X *        ParseOption()
  818. X *
  819. X *        Parses an option string, setting the appropriate field in the
  820. X *        master Settings structure. This routine handles both Unix-style
  821. X *        -opts and also ReadArgs/ToolTypes keywords. Returns true if
  822. X *        the option string made sense, false otherwise.
  823. X *
  824. X ***************************************************************************/
  825. X
  826. Xint ParseOption(char *opt)
  827. X{
  828. X#define MATCHSTR(s1,s2)        (!strnicmp(s1, s2, sizeof(s2)-1))
  829. X
  830. X    if MATCHSTR(opt, "-a") {
  831. X        Settings.BlitMode    = BLIT_ALWAYS;
  832. X        Settings.OnlySingle    = NO;
  833. X        Settings.Broken        = NO;
  834. X    }
  835. X    else if MATCHSTR(opt, "-1")        Settings.BlitMode    = BLIT_ONE;
  836. X    else if MATCHSTR(opt, "-2")        Settings.BlitMode    = BLIT_TWO;
  837. X    else if MATCHSTR(opt, "-s")        Settings.BlitMode    = BLIT_SHARE;
  838. X    else if MATCHSTR(opt, "-b")        Settings.Broken        = YES;
  839. X    else if MATCHSTR(opt, "-o")        Settings.OnlySingle    = YES;
  840. X    else if MATCHSTR(opt, "-q")        QuitFlag            = YES;
  841. X    else if (MATCHSTR(opt, "-p") && opt[2])
  842. X        Settings.MinTaskPri = atoi(opt+2);
  843. X    else if MATCHSTR(opt, "BLITMODE") {
  844. X        char *p = opt + 8;
  845. X        if (*p++ && *p) {
  846. X            if        MATCHSTR(p, "ALWAYS")    Settings.BlitMode    = BLIT_ALWAYS;
  847. X            else if MATCHSTR(p, "ONE")        Settings.BlitMode    = BLIT_ONE;
  848. X            else if MATCHSTR(p, "TWO")        Settings.BlitMode    = BLIT_TWO;
  849. X            else if MATCHSTR(p, "SHARE")    Settings.BlitMode    = BLIT_SHARE;
  850. X        } else return (0);
  851. X    }
  852. X    else if MATCHSTR(opt, "BROKEN") {
  853. X        char *p = opt + 6;
  854. X        if (*p++ && MATCHSTR(p, "NO"))        Settings.Broken        = NO;
  855. X        else                                 Settings.Broken        = YES;
  856. X    }
  857. X    else if MATCHSTR(opt, "SINGLE") {
  858. X        char *p = opt + 6;
  859. X        if (*p++ && MATCHSTR(p, "NO"))        Settings.OnlySingle    = NO;
  860. X        else                                 Settings.OnlySingle = YES;
  861. X    }
  862. X    else if MATCHSTR(opt, "MINTASKPRI") {
  863. X        char *p = opt + 10;
  864. X        if (*p++ && *p)                        Settings.MinTaskPri = atoi(p);
  865. X        else return (0);
  866. X    }
  867. X    else if MATCHSTR(opt, "QUIT")            QuitFlag = YES;
  868. X    else  return (0);
  869. X
  870. X    return (1);
  871. X}
  872. X
  873. X/****************************************************************************
  874. X *
  875. X *        MyFindPort(name)
  876. X *
  877. X *        Replacement for the FindPort() in exec.library. Under 1.3, FindPort()
  878. X *        will cause Enforcer hits since FFS partitions create public ports
  879. X *        that have no name (this is a no-no), and FindPort() doesn't check
  880. X *        for null names.
  881. X *        
  882. X *        Even though this isn't really CpuBlit's problem, I had quite a few
  883. X *        reports of CpuBlit causing Enforcer hits which turned out to be
  884. X *        because of this, so I've added this workaround to keep people
  885. X *        happy.
  886. X *
  887. X *        Commodore made FindPort() (actually FindName()) a bit more robust
  888. X *        under Kickstart 2.0, so in that case we can safely use the standard
  889. X *        routine.
  890. X *
  891. X ***************************************************************************/
  892. X
  893. Xstruct MsgPort *MyFindPort(char *name)
  894. X{
  895. X    struct Node *nd;
  896. X    extern struct ExecBase *SysBase;
  897. X
  898. X    if (SysBase->LibNode.lib_Version >= 36)
  899. X        return (FindPort(name));
  900. X
  901. X    Forbid();
  902. X    for (nd = SysBase->PortList.lh_Head; nd; nd = nd->ln_Succ)
  903. X        if (nd->ln_Name && !strcmp(nd->ln_Name, name))
  904. X            break;
  905. X    Permit();
  906. X    return (struct MsgPort *)nd;
  907. X}
  908. X
  909. X
  910. X/****************************************************************************
  911. X *
  912. X *        mainloop()
  913. X *
  914. X *        This is the main event loop. It sits waiting for a message from
  915. X *        other invocations of CpuBlit, which tell it to either change the
  916. X *        current settings or to remove itself.
  917. X *
  918. X ***************************************************************************/
  919. X
  920. Xvoid mainloop(void)
  921. X{
  922. X    struct MsgPort *MyPort;
  923. X    int installed = 1;
  924. X    __fptr *BltBitMapPtr = (__fptr *)BltBitMapAddress;
  925. X
  926. X    /*
  927. X     *        We have to create our rendezvous port here rather than in the
  928. X     *        mainline, since the message port depends on task information etc.
  929. X     *        This is not altogether satisfactory since if it fails, there is
  930. X     *        no way to tell the user (as a background task, we have no stdin
  931. X     *        or stdout). But since port creation is unlikely to fail anyway,
  932. X     *        it's not a big problem.
  933. X     */
  934. X    MyPort = CreatePort(PORTNAME, 0);
  935. X    if (!MyPort)
  936. X        return;
  937. X
  938. X    /*
  939. X     *        Now have to open graphics.library, so that we can add in our
  940. X     *        new patch. As above, if this fails there is no easy way to
  941. X     *        tell the user. However, at least it won't crash the system.
  942. X     */
  943. X    GfxBase = OpenLibrary("graphics.library", 0);
  944. X    if (!GfxBase)
  945. X        return;
  946. X
  947. X    *BltBitMapPtr = SetFunction(GfxBase, BltBitMap_LVO, NewBltBitMap);
  948. X
  949. X    /*
  950. X     *        Now wait a message from another copy of CpuBlit. This will
  951. X     *        either contain an updated command line argument or else a
  952. X     *        request to quit.
  953. X     */
  954. X    do {
  955. X        __fptr oldptr;
  956. X
  957. X        WaitPort(MyPort);
  958. X        while ((msg = (struct MyMsg *)GetMsg(MyPort)) != NULL) {
  959. X            switch (msg->command) {
  960. X
  961. X            case MSG_GETVARS:
  962. X                memcpy(msg->vars, &Settings, sizeof(Settings));
  963. X                break;
  964. X
  965. X            case MSG_SETVARS:
  966. X                memcpy(&Settings, msg->vars, sizeof(Settings));
  967. X                SetVars(&Settings);
  968. X                break;
  969. X
  970. X            case MSG_QUIT:
  971. X                /*
  972. X                 *        Try and remove ourselves. We have to surround this
  973. X                 *        with Forbid() to make sure that no other tasks manage
  974. X                 *        to call BltBitMap() in the case where we restore the
  975. X                 *        original vector and then realise that its current
  976. X                 *        replacement actually pointed to something other than
  977. X                 *        CpuBlit.
  978. X                 */
  979. X                Forbid();
  980. X                oldptr = SetFunction(GfxBase, BltBitMap_LVO, *BltBitMapPtr);
  981. X                if (oldptr == NewBltBitMap) {
  982. X                    installed = 0;
  983. X                    msg->result = MSG_REMOVED;
  984. X                } else {
  985. X                    SetFunction(GfxBase, BltBitMap_LVO, oldptr);
  986. X                    msg->result = MSG_FAILED;
  987. X                }
  988. X                Permit();
  989. X            }
  990. X            ReplyMsg(msg);
  991. X        }
  992. X    } while (installed);
  993. X
  994. X    /*
  995. X     *        Now our patch has been removed, it only remains to free up the
  996. X     *        code. It is possible that someone is still in our blitter code.
  997. X     *        We can determine this fairly safely by looking at UsageCount;
  998. X     *        if this is -1, nobody is in our code. Otherwise, we wait until
  999. X     *        it is -1 (delaying for a little while inbetween to give programs
  1000. X     *        a chance to run).
  1001. X     *
  1002. X     *        We also set the blitter test function to ExitBlit, so that if
  1003. X     *        someone does slip through our test and end up inside our code,
  1004. X     *        they will get rerouted back to the normal blitter code almost
  1005. X     *        immediately.
  1006. X     */
  1007. X    DeletePort(MyPort);
  1008. X    BlitFunc = ExitBlit;
  1009. X
  1010. X    while (UsageCount != -1)
  1011. X        Delay(10);                /* Wait 0.2 seconds */
  1012. X
  1013. X    /*
  1014. X     *        Now we're completely finished so we can close the libraries
  1015. X     *        and exit.
  1016. X     */
  1017. X    CloseLibrary(GfxBase);
  1018. X}
  1019. X
  1020. X
  1021. X/****************************************************************************
  1022. X *
  1023. X *        Mainline 
  1024. X *
  1025. X ***************************************************************************/
  1026. X
  1027. Xvoid main(int argc, char **argv)
  1028. X{
  1029. X    struct MsgPort *BlitPort;
  1030. X    int i;
  1031. X
  1032. X    FromWorkbench = (argc == 0);
  1033. X
  1034. X    /*
  1035. X     *        Now see if CpuBlit is already running in
  1036. X     *        the background. If it is, then get a copy of the settings it
  1037. X     *        is currently using.
  1038. X     */
  1039. X    BlitPort = MyFindPort(PORTNAME);
  1040. X    if (BlitPort) {
  1041. X        /*
  1042. X         *        The new blit routine has already been installed. So, send
  1043. X         *        it a message giving the command line options (if any)
  1044. X         *        to the remote routine, telling it to update its own options.
  1045. X         */
  1046. X        AlreadyRunning = YES;
  1047. X        LocalPort = CreatePort(NULL, 0);
  1048. X        if (!LocalPort) {
  1049. X            if (!FromWorkbench)
  1050. X                print("CpuBlit: couldn't create local message port.\n");
  1051. X            myexit(10);
  1052. X        }
  1053. X        MyMsg.msg.mn_ReplyPort    = LocalPort;
  1054. X        MyMsg.command            = MSG_GETVARS;
  1055. X        MyMsg.vars               = &Settings;
  1056. X        PutMsg(BlitPort, &MyMsg);
  1057. X        WaitPort(LocalPort);
  1058. X        GetMsg(LocalPort);
  1059. X    }
  1060. X    /*
  1061. X     *        Now parse the command line options, modifying our local copy
  1062. X     *        of Settings accordingly.
  1063. X     */
  1064. X    if (FromWorkbench) {
  1065. X        extern struct WBStartup *WBenchMsg;
  1066. X        struct WBArg *wbarg = WBenchMsg->sm_ArgList;
  1067. X
  1068. X        IconBase = (struct IconBase *)OpenLibrary("icon.library", 0);
  1069. X        if (!IconBase)
  1070. X            myexit(5);
  1071. X
  1072. X        /*
  1073. X         *        Now walk down all the icons we've been given (probably
  1074. X         *        just our own tool icon) and parse the arguments present
  1075. X         *        in each one.
  1076. X         */
  1077. X        for (i = 0; i < WBenchMsg->sm_NumArgs; i++, wbarg++) {
  1078. X            struct DiskObject *dobj;
  1079. X            char **tooltypes;
  1080. X            BPTR olddir;
  1081. X
  1082. X            if (wbarg->wa_Lock && *wbarg->wa_Name) {
  1083. X                olddir = CurrentDir(wbarg->wa_Lock);
  1084. X                if (dobj = GetDiskObject(wbarg->wa_Name)) {
  1085. X                    for (tooltypes = dobj->do_ToolTypes;
  1086. X                                            *tooltypes; tooltypes++)
  1087. X                        ParseOption(*tooltypes);
  1088. X                }
  1089. X                FreeDiskObject(dobj);
  1090. X                CurrentDir(olddir);
  1091. X            }
  1092. X        }
  1093. X        CloseLibrary(IconBase);
  1094. X    } else {
  1095. X        /*
  1096. X         *        Plain jane CLI startup
  1097. X         */
  1098. X#if DEBUG
  1099. X        if (argv[1][0] == '!') {
  1100. X            static buf[1000];
  1101. X            sprintf(buf,
  1102. X                "Blitmode   = %d\n"
  1103. X                "OnlySingle = %d\n"
  1104. X                "Broken     = %d\n"
  1105. X                "MinTaskPri = %d\n",
  1106. X                Settings.BlitMode, Settings.OnlySingle,
  1107. X                Settings.Broken, Settings.MinTaskPri);
  1108. X            print(buf);
  1109. X            exit(5);
  1110. X        }
  1111. X#endif
  1112. X        for (i = 1; i < argc; i++) {
  1113. X            if (!ParseOption(argv[i])) {
  1114. X                print(HelpMsg);
  1115. X                myexit(5);
  1116. X            }
  1117. X        }
  1118. X    }
  1119. X
  1120. X    /*
  1121. X     *        Now we either send the options to the remote copy of CpuBlit
  1122. X     *        or install ourselves in the background.
  1123. X     */
  1124. X    if (AlreadyRunning) {
  1125. X        if (QuitFlag)
  1126. X            MyMsg.command = MSG_QUIT;
  1127. X        else
  1128. X            MyMsg.command = MSG_SETVARS;
  1129. X        PutMsg(BlitPort, &MyMsg);
  1130. X        WaitPort(LocalPort);
  1131. X        GetMsg(LocalPort);
  1132. X        if (FromWorkbench && MyMsg.result == MSG_FAILED) {
  1133. X            IntuitionBase = (struct IntuitionBase *)
  1134. X                            OpenLibrary("intuition.library", 0);
  1135. X            if (IntuitionBase) {
  1136. X                DisplayBeep(0);    /* Flash all screens -- pretty rude */
  1137. X                CloseLibrary(IntuitionBase);
  1138. X            }
  1139. X        }
  1140. X        if (!FromWorkbench) {
  1141. X            if (MyMsg.result == MSG_REMOVED)
  1142. X                print("CpuBlit removed successfully.\n");
  1143. X            else if (MyMsg.result == MSG_FAILED) {
  1144. X                print(
  1145. X"Couldn't remove CpuBlit; someone else has patched BltBitMap. Please remove\n"
  1146. X"any other utilities you have installed and then try again.\n");
  1147. X                myexit(5);
  1148. X            }
  1149. X        }
  1150. X        myexit(0);
  1151. X    }
  1152. X
  1153. X    /*
  1154. X     *        This is the first time we are being run. If we were run from
  1155. X     *        the CLI, detach ourselves (and allow the current process to
  1156. X     *        return to the CLI immediately). If we were run from Workbench,
  1157. X     *        then just call the message handling code directly and wait
  1158. X     *        until another copy of CpuBlit asks us to return.
  1159. X     */
  1160. X    if (QuitFlag) {
  1161. X        if (!FromWorkbench)
  1162. X            print("CpuBlit hasn't been installed yet.\n");
  1163. X        myexit(5);
  1164. X    }
  1165. X
  1166. X    SetVars(&Settings);
  1167. X    if (FromWorkbench)
  1168. X        mainloop();
  1169. X    else {
  1170. X        if (!res(NAME, 5, mainloop, 4000)) {
  1171. X            print("Couldn't spawn background CpuBlit task.\n");
  1172. X            myexit(10);
  1173. X        }
  1174. X        print(SIGNON);
  1175. X    }
  1176. X    myexit(0);
  1177. X}
  1178. END_OF_FILE
  1179. if test 15098 -ne `wc -c <'src/cpublit.c'`; then
  1180.     echo shar: \"'src/cpublit.c'\" unpacked with wrong size!
  1181. fi
  1182. # end of 'src/cpublit.c'
  1183. fi
  1184. if test -f 'src/makefile' -a "${1}" != "-c" ; then 
  1185.   echo shar: Will not clobber existing file \"'src/makefile'\"
  1186. else
  1187. echo shar: Extracting \"'src/makefile'\" \(821 characters\)
  1188. sed "s/^X//" >'src/makefile' <<'END_OF_FILE'
  1189. X#
  1190. X# Lattice LKM makefile, for SAS/C C V5.10a                          :ts=8
  1191. X#
  1192. X# CpuBlit (C) Copyright Eddy Carroll, Feb 1991
  1193. X#
  1194. X
  1195. X#DBSYM    = -d5
  1196. XCFLAGS    = -cusq -j88i -ms -v $(DBSYM)
  1197. XBFLAGS    = sc sd nd map ram:map
  1198. X#BFLAGS    = sc sd map ram:map addsym
  1199. XLIBS    = lib:lc.lib lib:amiga.lib
  1200. XASM    = lc:asm
  1201. X
  1202. X.c.o:
  1203. X    lc $(CFLAGS) -Hsystem.sym $*.c
  1204. X.s.o:
  1205. X    $(ASM) -iinclude: $*.s    # Standard "pure" assembly
  1206. X.a.o:
  1207. X    $(ASM) -u -iinclude: $*.a # Prefixes all labels with style underscore
  1208. X.n.doc:
  1209. X    nro >$*.doc -ms:an $*.n
  1210. X.h.sym:
  1211. X    lc1 -ph -o$*.sym $*.h
  1212. X
  1213. X#
  1214. X# Makefile dependencies
  1215. X#
  1216. X
  1217. XNAME    = cpublit
  1218. X
  1219. Xall: $(NAME)
  1220. X
  1221. XOBJS    = small.o $(NAME).o scroll.o res.o
  1222. X
  1223. X$(NAME): $(OBJS) makefile
  1224. X    blink from $(OBJS) to $(NAME) $(BFLAGS) lib $(LIBS)
  1225. X
  1226. Xsystem.sym:    system.h
  1227. Xcpublit.o:    cpublit.c    scroll.h    system.sym
  1228. Xsmall.o:    small.a
  1229. Xscroll.o:    scroll.s
  1230. Xres.o:        res.s
  1231. END_OF_FILE
  1232. if test 821 -ne `wc -c <'src/makefile'`; then
  1233.     echo shar: \"'src/makefile'\" unpacked with wrong size!
  1234. fi
  1235. # end of 'src/makefile'
  1236. fi
  1237. if test -f 'src/res.s' -a "${1}" != "-c" ; then 
  1238.   echo shar: Will not clobber existing file \"'src/res.s'\"
  1239. else
  1240. echo shar: Extracting \"'src/res.s'\" \(6516 characters\)
  1241. sed "s/^X//" >'src/res.s' <<'END_OF_FILE'
  1242. X*:ts=8
  1243. X*****************************************************************************
  1244. X*                                                                           *
  1245. X* RES.S                                    (C) Copyright Eddy Carroll 1989  *
  1246. X*                                                                           *
  1247. X* This module allows you to make a duplicate copy of your current process.  *
  1248. X* In fact, both processes actually share the same code. However, the        *
  1249. X* seglist pointer of the current process is modified so that when the       *
  1250. X* process terminates, the memory doesn't get freed (if it did, the new      *
  1251. X* process would suddenly find itself deallocated. Hello guru...)            *
  1252. X* This code only works when called from CLI processes.                      *
  1253. X*                                                                           *
  1254. X* The parameters passed are similar to those for CreateProc(), with the     *
  1255. X* difference that instead of passing a BPTR to a seglist, you pass the      *
  1256. X* address of the function the new process should start executing at.        *
  1257. X*                                                                           *
  1258. X* When the new process returns from this function, it will be removed from  *
  1259. X* the system, and its memory (finally) deallocated.                         *
  1260. X*                                                                           *
  1261. X* The typical use for a function like this is to allow a program to detach  *
  1262. X* itself from a CLI (completely, with no trailing console handles etc.)     *
  1263. X* when it is run. This is a convenient feature for the user, if the program *
  1264. X* is of the sort designed to sit in the background the whole time, rather   *
  1265. X* than do something immediately, then exit.                                 *
  1266. X*                                                                           *
  1267. X* Lattice provide cback.o which at first glance would seem to provide a     *
  1268. X* similar solution. However, cback.o makes it difficult to print error      *
  1269. X* messages to the console if there is an error on the command line - by     *
  1270. X* the time you spot the error, the CLI prompt has already been printed      *
  1271. X* and your error message is printed after it. This looks very messy.        *
  1272. X* Res avoids this problem by not spawning the background process until      *
  1273. X* after the error checking has been done.                                   *
  1274. X*                                                                           *
  1275. X* From C, you call it as follows:                                           *
  1276. X*                                                                           *
  1277. X* pid = res(name,pri,func,stacksize)                                        *
  1278. X*                                                                           *
  1279. X* name         - pointer to null terminated string                          *
  1280. X* pri          - integer, priority of the new process                       *
  1281. X* func         - pointer to the function for new process to call            *
  1282. X* stacksize    - integer, size of the stack for the new process             *
  1283. X*                                                                           *
  1284. X* pid          - Process ID of new process, or 0 if none created            *
  1285. X*                                                                           *
  1286. X*****************************************************************************
  1287. X
  1288. X    INCLUDE "exec/types.i"
  1289. X        INCLUDE "exec/alerts.i"
  1290. X        INCLUDE "exec/nodes.i"
  1291. X        INCLUDE "exec/lists.i"
  1292. X        INCLUDE "exec/ports.i"
  1293. X        INCLUDE "exec/libraries.i"
  1294. X        INCLUDE "exec/tasks.i"
  1295. X        INCLUDE "libraries/dos.i"
  1296. X        INCLUDE "libraries/dosextens.i"
  1297. X        INCLUDE "workbench/startup.i"
  1298. X        INCLUDE "exec/funcdef.i"
  1299. X        INCLUDE "exec/exec_lib.i"
  1300. X        INCLUDE "libraries/dos_lib.i"
  1301. X
  1302. X    xref    _exit
  1303. X    xref    _DOSBase
  1304. X    xdef    _res
  1305. X
  1306. XAbsExecBase    equ    4
  1307. Xsegsize        equ    36        ; Size of fake seg. (code = 28 bytes)
  1308. X
  1309. X        csect   text,0,0,1,2        * xref's after this are 16-bit reloc
  1310. X
  1311. X
  1312. Xcallsys macro
  1313. X        CALLLIB _LVO\1
  1314. X    endm
  1315. X
  1316. X_res:
  1317. X    movem.l    d2-d4/a2/a3/a6,-(a7)    ; Save registers
  1318. X    move.l    AbsExecBase.w,a6    ; Get base of Exec library
  1319. X    moveq    #0,d1            ; Any sort of memory will do
  1320. X    moveq    #segsize,d0        ; Get size of fake segment
  1321. X    callsys    AllocMem        ; Grab some memory
  1322. X    tst.l    d0            ; Did we get any?
  1323. X    beq    fatal            ; If not, abort immediately!
  1324. X    move.l    d0,a3            ; Save pointer to memory
  1325. X    sub.l    a1,a1            ; NULL pointer indicates our process
  1326. X    callsys    FindTask        ; Get pointer to our process block
  1327. X    move.l    d0,a2            ; Save it
  1328. X    move.l    pr_CLI(A2),a0        ; Get BPTR to our process's segarray
  1329. X    add.l    a0,a0            ; Convert BPTR to address
  1330. X    add.l    a0,a0            ; 
  1331. X    move.l    cli_Module(a0),4(a3)    ; Make fake segment point to our code
  1332. X    clr.l    cli_Module(a0)        ; Remove process seg. from CLI seglist
  1333. X    move.l    #segsize,(a3)        ; Set size of fake seglist
  1334. X    lea.l    8(a3),a2        ; Get pointer to first code byte
  1335. X
  1336. X;
  1337. X; Now a tiny machine code program is constructed. It looks like this:
  1338. X;
  1339. X;    move.l    #$xxxxxx,A4    ; Initialise A4
  1340. X;    jsr    $xxxxxx        ; Call user program
  1341. X;    move.l    #$xxxxxx,A6    ; Load DOSbase into A6
  1342. X;    move.l    #$xxxxxx,d1    ; Get BPTR to this segment 
  1343. X;    jmp    UnLoadSeg(A6)    ; Unload our process from memory
  1344. X;
  1345. X; It's built "on the fly" so to speak, to keep code size down, and also
  1346. X; because it's a convenient way of initialising all the variables.
  1347. X; Note that a potential problem exists if DOSBase should somehow alter or
  1348. X; disappear. We'll assume it will remain relatively stable for the next
  1349. X; few years anyway :-)
  1350. X;
  1351. X
  1352. X    move.l    _DOSBase,a6        ; Prepare for DOS call
  1353. X    move.w    #$287C,(a2)+        ; Store MOVE.L $xxxxxx,A4 instruction
  1354. X    move.l    a4,(a2)+        ; Output value of A4 to initialise to
  1355. X    move.w    #$4EB9,(a2)+        ; Store JSR $xxxxxx
  1356. X    move.l    36(a7),(a2)+        ; followed by address of user function
  1357. X    move.w    #$2C7C,(a2)+        ; Store MOVE.L $xxxxxx,A6 instruction
  1358. X    move.l    a6,(a2)+        ; followeds by current DOSbase
  1359. X;
  1360. X    lea    4(a3),a3        ; Now get seglist ptr to fake segment
  1361. X    move.l    a3,d3            ; and convert it to BPTR
  1362. X    lsr.l    #2,d3            ; D3 now has seglist ptr to fake seg
  1363. X    move.w    #$223C,(a2)+        ; Store MOVE.L $xxxxxx,D1 instruction
  1364. X    move.l    d3,(a2)+        ; Followed by BPTR to the segment
  1365. X    move.l    #$4EEEFF64,(a2)+    ; Store JMP UnLoadSeg(A6)
  1366. X;
  1367. X    move.l    28(A7),d1        ; Get pointer to name
  1368. X    move.l    32(A7),d2        ; Get process priority
  1369. X    move.l    40(A7),d4        ; Get stacksize
  1370. X    callsys    CreateProc        ; Create new process
  1371. X    movem.l    (a7)+,d2-d4/a2/a3/a6    ; Pop registers
  1372. X    rts                ; Return
  1373. Xfatal:
  1374. X    moveq    #120,d0            ; Set error exit code
  1375. X    jmp    _exit            ; And exit
  1376. X
  1377. X    end
  1378. END_OF_FILE
  1379. if test 6516 -ne `wc -c <'src/res.s'`; then
  1380.     echo shar: \"'src/res.s'\" unpacked with wrong size!
  1381. fi
  1382. # end of 'src/res.s'
  1383. fi
  1384. if test -f 'src/scroll.h' -a "${1}" != "-c" ; then 
  1385.   echo shar: Will not clobber existing file \"'src/scroll.h'\"
  1386. else
  1387. echo shar: Extracting \"'src/scroll.h'\" \(1524 characters\)
  1388. sed "s/^X//" >'src/scroll.h' <<'END_OF_FILE'
  1389. X/****************************************************************************
  1390. X *
  1391. X *        SCROLL.H
  1392. X *
  1393. X *        Declares functions and variables available in the assembly
  1394. X *        file SCROLL.S.
  1395. X *
  1396. X *        We have to do a little trick to allow the smalldata model to be
  1397. X *        used with Blink. We want to modify the longword stored at
  1398. X *        BltBitMapAddress. However, this is located in the code section
  1399. X *        of the program. The solution is to declare it as a function, then
  1400. X *        setup a pointer to it from inside the actual code and modify it
  1401. X *        through the pointer. This is a little ugly, but reduces the code
  1402. X *        size by about 20%.
  1403. X *
  1404. X ***************************************************************************/
  1405. X
  1406. Xextern void NewBltBitMap();            /* Our replacement BltBitMap routine    */
  1407. Xextern void BltBitMapAddress();        /* Points to original BltBitMap()        */    
  1408. X
  1409. Xextern void Friend1();                /* Ptr to check fn for one active task    */
  1410. Xextern void Friend2();                /* Ptr to check fn for two active tasks    */
  1411. Xextern void ShareBlit();            /* Ptr to check fn to share CPU/blitter    */
  1412. Xextern void StartBlit();            /* Ptr to check fn that always uses CPU    */
  1413. Xextern void ExitBlit();                /* Ptr to check fn that never uses CPU    */
  1414. X
  1415. Xextern void (*BlitFunc)();            /* Holds Ptr to current check function    */
  1416. Xextern long UsageCount;                /* No. of callers currently in CPU code    */
  1417. Xextern long OnlySingle;                /* True if restricting blits to 1 bmap    */
  1418. Xextern long Broken;                    /* True if handling broken software        */
  1419. Xextern BYTE MinTaskPri;                /* Ignore tasks with pri <= this value    */
  1420. END_OF_FILE
  1421. if test 1524 -ne `wc -c <'src/scroll.h'`; then
  1422.     echo shar: \"'src/scroll.h'\" unpacked with wrong size!
  1423. fi
  1424. # end of 'src/scroll.h'
  1425. fi
  1426. if test -f 'src/small.a' -a "${1}" != "-c" ; then 
  1427.   echo shar: Will not clobber existing file \"'src/small.a'\"
  1428. else
  1429. echo shar: Extracting \"'src/small.a'\" \(7425 characters\)
  1430. sed "s/^X//" >'src/small.a' <<'END_OF_FILE'
  1431. X*:ts=8
  1432. X******************************************************************************
  1433. X*                                         *
  1434. X*    SMALL.A                  (C) Copyright Eddy Carroll 1991    *
  1435. X*    ~~~~~~~                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    *
  1436. X*                                         *
  1437. X*    Replacement startup code for Lattice C V5.10a. Use instead of c.o.   *
  1438. X*    This has many features stripped out to allow small utilities to      *
  1439. X*    have as small a filesize as possible. If you use this, don't call    *
  1440. X*    any stdio functions.                             *
  1441. X*                                                                            *
  1442. X*     In some of my earlier projects, I used a similar file called tiny.a. *
  1443. X*    Small.a is essentially that file but with Workbench support added.   *
  1444. X*    avoid confusion between the two.                     *
  1445. X*                                                                            *
  1446. X******************************************************************************
  1447. X
  1448. X    INCLUDE "exec/types.i"
  1449. X    INCLUDE "exec/execbase.i"
  1450. X    INCLUDE "exec/nodes.i"
  1451. X    INCLUDE "exec/lists.i"
  1452. X    INCLUDE "exec/ports.i"
  1453. X    INCLUDE "exec/libraries.i"
  1454. X    INCLUDE "exec/tasks.i"
  1455. X    INCLUDE "libraries/dos.i"
  1456. X    INCLUDE "libraries/dosextens.i"
  1457. X    INCLUDE "workbench/startup.i"
  1458. X    INCLUDE "exec/funcdef.i"
  1459. X    INCLUDE "exec/exec_lib.i"
  1460. X    INCLUDE "libraries/dos_lib.i"
  1461. X
  1462. XMAXARGS        EQU 100    ; Maximum number of command line arguments from CLI
  1463. XAbsExecBase EQU 4    ; Welcome to the only fixed point in the universe
  1464. X
  1465. X* A useful macro to let us call library routines
  1466. Xcallsys macro
  1467. X    CALLLIB _LVO\1
  1468. X    endm
  1469. X
  1470. X    xdef    XCEXIT
  1471. X    xdef    exit
  1472. X    xref    LinkerDB
  1473. X    xref    _BSSBAS
  1474. X    xref    _BSSLEN
  1475. X
  1476. X    csect    text,0,0,1,2        * xref's after this are 16-bit reloc
  1477. X    xref    main            * Name of C program to start with.
  1478. X
  1479. Xstart:
  1480. X    movem.l d1-d6/a0-a6,-(a7)
  1481. XREGSIZE EQU    (6+7)*4
  1482. X    lea    REGSIZE(a7),A5        * Determine old stack pointer
  1483. X    move.l    a0,a2            * Save command pointer
  1484. X    move.l    d0,d2            * and command length
  1485. X    lea    LinkerDB,a4        * Load base register
  1486. X
  1487. X    move.l    AbsExecBase.W,a6
  1488. X    move.l    a6,SysBase(A4)
  1489. X    move.l    a7,_StackPtr(A4)    * Save stack ptr
  1490. X
  1491. X    move.l    a5,D0              * get top of stack
  1492. X    sub.l    4(a5),D0        * compute bottom
  1493. X    add.l    #128,D0         * allow for parms overflow
  1494. X    move.l    D0,_base(A4)        * save for stack checking
  1495. X
  1496. X    lea    DOSName(A4),A1
  1497. X    moveq.l    #0,D0
  1498. X    callsys    OpenLibrary
  1499. X    move.l    D0,DOSBase(A4)
  1500. X    beq    NoDos
  1501. X
  1502. X    move.l    ThisTask(a6),a3        * Get our task ID
  1503. X    tst.l    pr_CLI(a3)        * Running from Workbench?
  1504. X    bne.s    getcom            * If no, skip to do CLI stuff
  1505. X    lea    pr_MsgPort(a3),a0    * Our process port
  1506. X    callsys    WaitPort        * Wait for Workbench startup message
  1507. X    lea    pr_MsgPort(a3),a0    * Get our message port again
  1508. X    callsys    GetMsg            * Get startup message
  1509. X    move.l    d0,WBenchMsg(a4)    * Save pointer to it
  1510. X    move.l    d0,-(sp)        * Save it as argv
  1511. X    moveq    #0,d0            * And push argc of 0 to indicate WB
  1512. X    move.l    d0,-(sp)        *
  1513. X    bra    cont            * Skip to init BSS and start prog
  1514. X
  1515. X*------ find command name:
  1516. Xgetcom:
  1517. X    move.l  pr_CLI(a3),a0
  1518. X    add.l    a0,a0
  1519. X    add.l    a0,a0
  1520. X    move.l    cli_CommandName(a0),a1
  1521. X    add.l    a1,a1
  1522. X    add.l    a1,a1
  1523. X
  1524. X*------ collect parameters:
  1525. X    move.l    d2,d0            * get command line length
  1526. X    moveq.l #0,d1
  1527. X    move.b    (a1)+,d1
  1528. X    move.l    a1,_ProgramName(A4)
  1529. X    add.l    d1,d0            * add length of command name
  1530. X    addq.l    #1,d0            * allow for space after command
  1531. X
  1532. X    clr.w    -(A7)            * set null terminator for command line
  1533. X    addq.l    #1,D0            * force to even number of bytes
  1534. X    andi.w    #$fffe,D0        * (round up)
  1535. X    sub.l    D0,A7            * make room on stack for command line
  1536. X    subq.l    #2,D0
  1537. X    clr.w    0(A7,D0)
  1538. X
  1539. X*------ copy command line onto stack
  1540. X    move.l    d2,d0            * get command line length
  1541. X    subq.l    #1,d0
  1542. X    add.l    d1,d2
  1543. X
  1544. Xcopy_line:
  1545. X    move.b    0(A2,D0.W),0(A7,D2.W)    * copy command line to stack
  1546. X    subq.l    #1,d2
  1547. X    dbf    d0,copy_line
  1548. X    move.l    d2,d0            * save offset to argv[1] - 1
  1549. X    clr.b    0(a7,d2.w)         * Insert command name terminator
  1550. X    subq.l    #1,d2
  1551. X
  1552. Xcopy_cmd:
  1553. X    move.b    0(a1,d2.w),0(a7,d2.w)    * copy command name to stack
  1554. X    dbf    d2,copy_cmd
  1555. X    lea    1(a7,d0.w),a1        * get pointer to start of arguments
  1556. X    move.l    a7,a2            * get pointer for argv[0]
  1557. X
  1558. X    sub.l    #(MAXARGS*4),a7        * Reserve space for argv[]
  1559. X    move.l    a7,a3            * Save ptr to base of argv (&argv[0])
  1560. X    move.l    a2,(a7)            * Setup argv[0] to point to cmd line
  1561. X    lea    4(a7),a2        * Init base into array at argv[1]
  1562. X    moveq    #1,d2            * Initialise argc
  1563. X
  1564. X*
  1565. X* From here on down, A1 is pointer into command line
  1566. X*
  1567. Xbuild_argv:
  1568. X    bsr.s    getnext            * Read next character from line
  1569. X    bcs.s    doquote            * If quote, handle
  1570. X    beq.s    build_argv        * If white space, skip over it
  1571. X
  1572. X    lea    -1(a1),a0        * Get address of this parameter
  1573. X    bsr.s    bumpargv        * Store it to argv[] array
  1574. Xbuild_2:
  1575. X    bsr.s    getnext            * Get next character
  1576. X    bne.s    build_2            * If not white space, keep looking
  1577. X    clr.b    -1(a1)            * Zero-terminate current argument
  1578. X    bra.s    build_argv        * And go back to get next argument
  1579. X
  1580. Xdoquote:
  1581. X    move.l    a1,a0            * Get pointer to this argument
  1582. X    bsr.s    bumpargv        * Output it to argv[]
  1583. Xquote_2:
  1584. X    bsr.s    getnext            * Get next character
  1585. X    bcc.s    quote_2            * If not quote, keep looking
  1586. X    clr.b    -1(a1)            * Zero-terminate current argument
  1587. Xquote_3:
  1588. X    bsr.s    getnext            * Get next character
  1589. X    bne.s    quote_3            * Skip until space reached
  1590. X    beq.s    build_argv        * Go back and read next argument
  1591. X
  1592. Xbumpargv:
  1593. X    move.l    a0,(a2)+        * Output ptr to current argument
  1594. X    addq    #1,d2            * Increment argc
  1595. X    cmpi    #MAXARGS,d2        * Used up all our arguments yet?
  1596. X    bls.s    qrts            * If not, then return
  1597. X    moveq    #110,d0            * Else set return code
  1598. X    bra.s    exit2            * And exit
  1599. X
  1600. X*
  1601. X* Reads next character from command line. If zero, never returns, but
  1602. X* drops into call to main. Else, returns, with C=1 if character is quote,
  1603. X* Z=1 if character is white space.
  1604. X*
  1605. Xgetnext:
  1606. X    move.b    (a1)+,d0        * Get character from command line
  1607. X    beq.s    get_2            * Exit if end of line
  1608. X    cmp.b    #34,d0            * Check if quote
  1609. X    beq.s    isquote            *
  1610. X    cmp.b    #32,d0            * Check if space
  1611. X    beq.s    isspace            *
  1612. X    cmp.b    #9,d0            * Or tab
  1613. X    beq.s    isspace            *
  1614. X    cmp.b    #10,d0            * Or end of line
  1615. Xisspace:
  1616. X    andi    #$1E,ccr        * Clear carry flag, retaining Z
  1617. Xqrts    rts
  1618. X
  1619. Xisquote:
  1620. X    ori    #1,ccr            * Set carry flag
  1621. X    andi    #$FB,ccr        * Clear zero flag
  1622. X    rts                * And return
  1623. X
  1624. Xget_2:
  1625. X    move.l    a3,-(a7)        * Push argv onto stack
  1626. X    move.l    d2,-(a7)        * Push argc onto stack
  1627. X
  1628. Xcont:
  1629. X    lea    _BSSBAS,a3        * get base of BSS
  1630. X    moveq    #0,d1
  1631. X    move.l    #_BSSLEN,d0        * get length of BSS in longwords
  1632. X    bra.s    clr_lp            * and clear for length given
  1633. Xclr_bss move.l    d1,(a3)+
  1634. Xclr_lp    dbf    d0,clr_bss
  1635. X
  1636. Xdomain:
  1637. X    jsr    main(PC)        * Call main(argc,argv)
  1638. X    moveq.l #0,d0            * Set successful status
  1639. X    bra.s    exit2
  1640. X
  1641. XNoDos:
  1642. X    moveq.l    #100,d0            * Exit thread if no dos.library
  1643. X    bra.s    exit2            *
  1644. X
  1645. Xexit:
  1646. X_exit:
  1647. XXCEXIT:
  1648. X    move.l    4(SP),d0        * Extract return code
  1649. Xexit2:
  1650. X    move.l    d0,-(a7)
  1651. X    move.l    AbsExecBase.W,a6
  1652. X    move.l    DOSBase(A4),a1
  1653. X    callsys CloseLibrary        * Close Dos library
  1654. X
  1655. X*------ this rts sends us back to DOS:
  1656. X    tst.l    WBenchMsg(a4)        * Did we run from Workbench
  1657. X    beq.s    ExitToDOS        * If not, skip WB cleanup
  1658. X    move.l    SysBase(A4),a6        *
  1659. X    callsys    Forbid            * Stop Workbench unloading us too soon
  1660. X    move.l    WBenchMsg(a4),a1    *
  1661. X    callsys    ReplyMsg        * Return our startup msg
  1662. X
  1663. XExitToDOS:
  1664. X    move.l    (A7)+,D0
  1665. X    movea.l _StackPtr(a4),SP    * Restore stack ptr
  1666. X    movem.l (a7)+,d1-d6/a0-a6
  1667. X    rts
  1668. X
  1669. X*-----------------------------------------------------------------------
  1670. X* Global definitions
  1671. X*
  1672. X    csect    __MERGED,1,,2,2
  1673. X
  1674. X    xdef    NULL,SysBase,LoadAddress,DOSBase
  1675. X    xdef    _oserr,_OSERR,_ONBREAK
  1676. X    xdef    _ProgramName,_StackPtr,_base,WBenchMsg
  1677. X
  1678. XNULL           dc.l    0
  1679. X_base           dc.l    0
  1680. X_oserr           equ     *
  1681. X_OSERR           dc.l    0
  1682. X_ONBREAK       dc.l    0
  1683. XSysBase        dc.l    0
  1684. XLoadAddress    dc.l    0
  1685. X_StackPtr      dc.l    0
  1686. XDOSBase        dc.l    0
  1687. X_ProgramName   dc.l    0
  1688. XWBenchMsg      dc.l    0
  1689. XDOSName        dc.b    'dos.library',0
  1690. X
  1691. X    END
  1692. END_OF_FILE
  1693. if test 7425 -ne `wc -c <'src/small.a'`; then
  1694.     echo shar: \"'src/small.a'\" unpacked with wrong size!
  1695. fi
  1696. # end of 'src/small.a'
  1697. fi
  1698. if test -f 'src/system.h' -a "${1}" != "-c" ; then 
  1699.   echo shar: Will not clobber existing file \"'src/system.h'\"
  1700. else
  1701. echo shar: Extracting \"'src/system.h'\" \(356 characters\)
  1702. sed "s/^X//" >'src/system.h' <<'END_OF_FILE'
  1703. X#include <exec/types.h>
  1704. X#include <exec/execbase.h>
  1705. X#include <libraries/dos.h>
  1706. X#include <libraries/dosextens.h>
  1707. X#include <intuition/intuition.h>
  1708. X#include <workbench/startup.h>
  1709. X#include <workbench/workbench.h>
  1710. X#include <proto/exec.h>
  1711. X#include <proto/dos.h>
  1712. X#include <proto/graphics.h>
  1713. X#include <proto/intuition.h>
  1714. X#include <proto/icon.h>
  1715. X#include <string.h>
  1716. END_OF_FILE
  1717. if test 356 -ne `wc -c <'src/system.h'`; then
  1718.     echo shar: \"'src/system.h'\" unpacked with wrong size!
  1719. fi
  1720. # end of 'src/system.h'
  1721. fi
  1722. echo shar: End of archive 1 \(of 2\).
  1723. cp /dev/null ark1isdone
  1724. MISSING=""
  1725. for I in 1 2 ; do
  1726.     if test ! -f ark${I}isdone ; then
  1727.     MISSING="${MISSING} ${I}"
  1728.     fi
  1729. done
  1730. if test "${MISSING}" = "" ; then
  1731.     echo You have unpacked both archives.
  1732.     rm -f ark[1-9]isdone
  1733. else
  1734.     echo You still need to unpack the following archives:
  1735.     echo "        " ${MISSING}
  1736. fi
  1737. ##  End of shell archive.
  1738. exit 0
  1739. -- 
  1740. Mail submissions (sources or binaries) to <amiga@uunet.uu.net>.
  1741. Mail comments to the moderator at <amiga-request@uunet.uu.net>.
  1742. Post requests for sources, and general discussion to comp.sys.amiga.misc.
  1743.